package com.glamour.hlcity.common.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.UUID;

/*
 * 附件
 * @author zhaoxing.liuzx
 *
 */
public class Attachment extends Entity {
	public Attachment(){
		uuidName();
	}
	private static final long serialVersionUID = 6090915724438184224L;

	/**
	 * 附件原始名称
	 */
	private String orignName;
	
	/**
	 * 附件新名称
	 */
	private String name;

	/**
	 * 附件绝对地址
	 */
	private String absolutePath;
	
	/**
	 * 附件相对地址
	 */
	private String relativePath;
	
	/**
	 * 附件大小 KB
	 */
	private BigDecimal size;
	
	/**
	 * 附件类型
	 */
	private String type;

	public String getOrignName() {
		return orignName;
	}

	public void setOrignName(String orignName) {
		this.orignName = orignName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAbsolutePath() {
		return absolutePath;
	}

	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}

	public String getRelativePath() {
		return relativePath;
	}

	public void setRelativePath(String relativePath) {
		this.relativePath = relativePath;
	}

	public BigDecimal getSize() {
		return size;
	}

	public void setSize(BigDecimal size) {
		this.size = size;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	/**
	 * 附件新名称
	 */
	public void uuidName(){
		setName(UUID.randomUUID().toString());
	}


}
